#ifndef ExcAC5A_H
#define ExcAC5A_H

#include "ExcitationSystemDynamics.hpp"
#include <list>
#include "Boolean.hpp"
#include "Float.hpp"


#include "PU.hpp"
#include "Seconds.hpp"
#include "Simple_Float.hpp"

namespace CIMPP {


	/*
	Modified IEEE AC5A alternator-supplied rectifier excitation system with different minimum controller output.
	*/
	class ExcAC5A: public ExcitationSystemDynamics
	{

	public:
					CIMPP::PU ka; 	/* Voltage regulator gain (Ka).  Typical Value = 400. Default: nullptr */
					CIMPP::PU ks; 	/* Coefficient to allow different usage of the model-speed coefficient (Ks).  Typical Value = 0. Default: nullptr */
					CIMPP::Seconds tb; 	/* Voltage regulator time constant (Tb).  Typical Value = 0. Default: nullptr */
					CIMPP::Seconds tc; 	/* Voltage regulator time constant (Tc).  Typical Value = 0. Default: nullptr */
					CIMPP::Seconds ta; 	/* Voltage regulator time constant (Ta).  Typical Value = 0.02. Default: nullptr */
					CIMPP::PU vrmax; 	/* Maximum voltage regulator output (Vrmax).  Typical Value = 7.3. Default: nullptr */
					CIMPP::PU vrmin; 	/* Minimum voltage regulator output (Vrmin).  Typical Value =-7.3. Default: nullptr */
					CIMPP::PU ke; 	/* Exciter constant related to self-excited field (Ke).  Typical Value = 1. Default: nullptr */
					CIMPP::Seconds te; 	/* Exciter time constant, integration rate associated with exciter control (Te).  Typical Value = 0.8. Default: nullptr */
					CIMPP::PU kf; 	/* Excitation control system stabilizer gains (Kf).  Typical Value = 0.03. Default: nullptr */
					CIMPP::Seconds tf1; 	/* Excitation control system stabilizer time constant (Tf1).  Typical Value  = 1. Default: nullptr */
					CIMPP::Seconds tf2; 	/* Excitation control system stabilizer time constant (Tf2).  Typical Value = 0.8. Default: nullptr */
					CIMPP::Seconds tf3; 	/* Excitation control system stabilizer time constant (Tf3).  Typical Value = 0. Default: nullptr */
					CIMPP::PU efd1; 	/* Exciter voltage at which exciter saturation is defined (Efd1).  Typical Value = 5.6. Default: nullptr */
					CIMPP::Simple_Float seefd1; 	/* Exciter saturation function value at the corresponding exciter voltage, Efd1 (S[Efd1]).  Typical Value = 0.86. Default: nullptr */
					CIMPP::PU efd2; 	/* Exciter voltage at which exciter saturation is defined (Efd2).  Typical Value = 4.2. Default: nullptr */
					CIMPP::Simple_Float seefd2; 	/* Exciter saturation function value at the corresponding exciter voltage, Efd2 (S[Efd2]).  Typical Value = 0.5. Default: nullptr */
					CIMPP::Simple_Float a; 	/* Coefficient to allow different usage of the model (a).  Typical Value = 1. Default: nullptr */
				
		static const char debugName[];
		virtual const char* debugString();
		
		/* constructor initialising all attributes to null */
		ExcAC5A();
		virtual ~ExcAC5A();
	
		static void addConstructToMap(std::unordered_map<std::string, BaseClass* (*)()>& factory_map);
		static void addPrimitiveAssignFnsToMap(std::unordered_map<std::string, assign_function>&);
		static void addClassAssignFnsToMap(std::unordered_map<std::string, class_assign_function>&);
		static const BaseClassDefiner declare();

	};

	BaseClass* ExcAC5A_factory();
}
#endif
